﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReserveMenu2.aspx.cs" Inherits="WeChat.MenuReservation.ReserveMenu2" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>菜单预定</title>
    <script src="../Script/rem.js"></script>
    <script src="../Script/jquery.min.js" type="text/javascript"></script>
    <script src="../Script/jquery-1.8.3.min.js?v=1.1"></script>
    <script src="../Scripts/mobiscroll-2.13.2.full.min.js?v=1.2"></script>
    <link href="../Content/mobiscroll-2.13.2.full.min.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="../css/base.css" />
    <link rel="stylesheet" type="text/css" href="../css/page.css" />
    <link rel="stylesheet" type="text/css" href="../css/all.css" />
    <link rel="stylesheet" type="text/css" href="../css/mui.min.css" />
    <link rel="stylesheet" type="text/css" href="../css/loaders.min.css" />
    <link rel="stylesheet" type="text/css" href="../css/loading.css" />
    <link href="../Script/slick/slick.css" rel="stylesheet" />
  <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css"/>
  <script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
      <link rel="stylesheet" type="text/css" href="https://res.wx.qq.com/open/libs/weui/1.1.2/weui.min.css"/>
    <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>  
    <script src="../Script/JquerySession.js"></script>
    <script type="text/javascript">
        $(window).load(function () {
            $(".loading").addClass("loader-chanage")
            $(".loading").fadeOut(300)
        })

        //根据时间段查询展示可订菜单
        function SelectTimeState(state) {
            $("#lunch,#dinner,#midnightSnack,#breakfast").removeClass("cur");
            $("#" + state).addClass("cur");
            $("[name='menus']").remove();
            $.ajax({
                type: "post",
                url: "../MenuReserveHandler.ashx",
                async:false,
                data: {TimeState: state,funcName: 'getMenuList' },
                success: function (data) {
                    if (data == null) return;
                        data = $.parseJSON(data);
                        var item = $.parseJSON(data.baseInfo); 
                        $("#empty").remove();
                        if (item == null||item=="")
                        {
                            $("#content").prepend('<div style="text-align:center;padding-top:3rem;" id="empty"><img src="../images/caip.png" style="width:2rem;"/><p style="padding-top:.3rem">商家未提供该时间段商品</p></div>');
                        }
                        else {
                            for (var i = 0; i < item.length; i++) {
                            var menuName = item[i].Name;
                            var price = item[i].Price;
                            var state = item[i].TimeStateId;
                            var OnSaleId = item[i].OnSaleId;   
                            var Image = item[i].Image;
                            var sdmc = item[i].sdmc;
                            $("#content").prepend('<div class="bottom clearfloat" name="menus" menuName="' + menuName + '" data-id="' + OnSaleId + '"> <div class="lie clearfloat"> <a href="#"><div class="tu clearfloat fl"><img src="../' + Image + '" onclick="tupian(\'../' + Image + '\')"/></div></a><div class="right clearfloat fl"><a href="#"><p class="tit">' + menuName + '</p></a > <div class="xia clearfloat"><a href="#"><p class="jifen fl over">￥' + price + '</p></a><span class="fr db" name="add" onclick="add(\'' + menuName + '\',' + price + ',\'' + sdmc + '\',' + OnSaleId + ')"><img src="../images/jia.png" /></span></div></div ></div ></div>');
                        }
                        }
                },
                error: function () {
                    alert("异常！");
                }
            });
        }
        //设置图片放大
        function tupian(image) {
            $("body").append('<div class="sharebg" style="text-align:center;"></div>');
            $(".sharebg").addClass("sharebg-active");
            $(".sharebg").prepend("<img src=" + image + " style='width:70%;margin-top:50%; border-radius: 15px;'  onclick='closed()'>");
         
        }
        //关闭放大图片
        function closed() {
            $(".sharebg").remove();
        }
        function submit() {    //点击确定按钮，把获取订单号，并把订单信息加入数据库  
          
            $.ajax({
                type: "post",
                url: "../MenuReserveHandler.ashx",
                data: { funcName: 'getGuid' },
                success: function (result) {
                    if (deductions == "是")
                        {
                    window.location.href = "../JsSDK/WxPay/SubmitOrder.aspx?price=" + $("#sum").text() + "&OrderID=" + result + "&openid=" + openid;
                    }
                    var sum = $("#sum").text(); 
                    var marr = new Array();
                    $($(".datetime")).each(function () {
                        var languageJson = {};
                       
                        $($(this).parents(".all").find(".tit")).each(function () {
                            marr.push($(this).text());
                        });
                        if (marr.length < 3)
                        {
                            $(".weui-dialog__bd").html("商家规定为按天订餐，请订满一天餐份！");
                            $("#dialog").css("display", "block");                          
                        }
                      else{
                       $($(this).parents(".all").find("[name = 'myCount']")).each(function () {
                           m = $(this).parents(".bottom").attr("data-id");       //上架ID       
                           languageJson[m] = $(this).text(); 
                       });  
                       var date = $(this).text();
                       $.ajax({
                           type: "post",
                           url: "../MenuReserveHandler.ashx",
                           data: { json: JSON.stringify(languageJson), OrderId: result, date: date, type: "other", funcName: "AddOrderDetail" },
                       });   
                        }
                    });
                    if (marr.length > 2)
                        {
                    var state = "";
                    if (deductions == "是") {
                        state = "1";
                    } else {
                        state = "2";
                    }
                    $.ajax({
                        type: "post",
                        url: "../MenuReserveHandler.ashx",
                        data: { OrderId: result, totalPrice: sum, openid: openid, state: state, funcName: "AddOrderList" },
                        success: function () {
                            if (deductions == "否") {//订餐成功
                                $("#toast").css("display", "block");
                                setTimeout(" window.location.href ='ReserveMenu2.aspx?openid=" + openid + "'", 2000)
                               // $("#que").attr('href',"ReserveMenu2.aspx")
                            }
                        }
                    });  
                    }
                },
                error: function () {
                    alert("异常！");
                }
            });     
        }
        //加入订单按钮
        function add(name, price, sdmc, OnSaleId) {
            var height = $(window).height();
            var cc = $("#determine").height();
            $(".am-share-sns").css("height", height - cc);
            var datetime = $("#seldate_dummy").val();//获取选择预定的时间
            $.ajax({
                type: "post",
                url: "../MenuReserveHandler.ashx",
                dataType: "json",
                async: false,
                data: { sdmc: sdmc, funcName: 'getTimeState'},
                success: function (data) {
                    for (var i = 0; i < data.length; i++) {
                        var sdmc = data[i].sdmc;
                        var kssj = data[i].kssj;
                        if (datetime == "")//如果时间为空则弹框提醒
                        {
                            $(".weui-dialog__bd").html("请选择用餐时间");
                            $("#dialog").css("display", "block");
                        } else {
                            var d = new Date();
                    
                            var a = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate() + " " + d.getHours() + ":" + (d.getMinutes() + reservationtime) + ":" + d.getSeconds();
                            var b=datetime +" "+ kssj;
                            if (new Date(a) > new Date(b)) {
                                $(".weui-dialog__bd").html("已不能订购今天的" + sdmc);
                                $("#dialog").css("display", "block");
                                return;
                            }
                            else {
                                var myar = new Array();
                                $($("[name='" + datetime + "']")).each(function () {
                                    myar.push($(this).text());
                                });
                                var arr = new Array();
                                $($("[name='" + datetime + "']").parents(".all").find(".tit")).each(function () {
                                    arr.push($(this).attr("name"));
                                });
                                //debugger
                                // 包含该日期
                                if (myar.indexOf(datetime) != -1) {
                                    var myarr = new Array();
                                    $($("[name='" + datetime + "']").parents(".top").siblings(".bottomall").find("[name='ww']")).each(function () {
                                        myarr.push($(this).text());
                                    });
                                    if (arr.indexOf(sdmc) != -1) {//包含该时间段的菜品
                                        if (myarr.indexOf(name) != -1) { //如果提交菜单弹出项已包含该菜品
                                            $("[name='" + datetime + "']").parents(".top").siblings(".bottomall").find("[name='" + sdmc + "']").siblings(".bottom").find("[name='" + name + "']").parents(".bottom").find("[name='myCount']").text(function (n, c) { return Number(c) + 1 });

                                            // $("[name='" + datetime + "']").parents(".top").siblings(".bottomall").find("[name='" + name + "']").parents(".bottom").find("[name='myCount']").text(function (n, c) { return Number(c) + 1 });
                                            $("[name='count']").text(function (n, c) { return Number(c) + 1 });
                                            $("[name='sum']").text(function (n, c) { return Number(c) + Number(price) });
                                        } else {
                                            if ($("[name='" + datetime + "']").parents(".top").siblings(".bottomall").find("[name='" + sdmc + "']").text() == "") {
                                                $("[name='" + datetime + "']").parents(".top").after('<div class="bottomall"><p class="tit" name= "' + sdmc + '" >' + sdmc + '预定</p></div>');
                                                $("[name='" + datetime + "']").parents(".all").find("[name='" + sdmc + "']").after('<div class="bottom clearfloat" data-id="' + OnSaleId + '"><p name="' + name + '" class="fl"><span  name="ww"  style="color:black">' + name + '</span><span name="myPrice">' + price + '</span></p><div class="you clearfloat fr"><ul><li name="jianBtn" onclick="jianBtn(\'' + name + '\',' + price + ',\'' + datetime + '\',\'' + sdmc + '\')"><img src="../images/jian.jpg" /></li><li name="myCount" >1</li><li name="jiaBtn" onclick="jiaBtn(\'' + name + '\',' + price + ',\'' + datetime + '\',\'' + sdmc + '\')"><img src="../images/jia.jpg" /></li></ul></div>');
                                            }
                                            else {//有预定至少一种
                                                $("[name='" + datetime + "']").parents(".all").find("[name='" + sdmc + "']").after('<div class="bottom clearfloat" data-id="' + OnSaleId + '"><p name="' + name + '" class="fl"><span  name="ww"  style="color:black">' + name + '</span><span name="myPrice">' + price + '</span></p><div class="you clearfloat fr"><ul><li name="jianBtn" onclick="jianBtn(\'' + name + '\',' + price + ',\'' + datetime + '\',\'' + sdmc + '\')"><img src="../images/jian.jpg" /></li><li name="myCount" >1</li><li name="jiaBtn" onclick="jiaBtn(\'' + name + '\',' + price + ',\'' + datetime + '\',\'' + sdmc + '\')"><img src="../images/jia.jpg" /></li></ul></div>');
                                            }
                                            $("[name='count']").text(function (n, c) { return Number(c) + 1 });
                                            $("[name='sum']").text(function (n, c) { return Number(c) + Number(price) });
                                        }
                                    } else {
                                        if ($("[name='" + datetime + "']").parents(".top").siblings(".bottomall").find("[name='" + sdmc + "']").text() == "") {
                                            $("[name='" + datetime + "']").parents(".top").after('<div class="bottomall"><p class="tit" name="' + sdmc + '">' + sdmc + '预定</p></div>');
                                            $("[name='" + datetime + "']").parents(".all").find("[name='" + sdmc + "']").after('<div class="bottom clearfloat" data-id="' + OnSaleId + '"><p name="' + name + '" class="fl"><span  name="ww"  style="color:black">' + name + '</span><span name="myPrice">' + price + '</span></p><div class="you clearfloat fr"><ul><li name="jianBtn" onclick="jianBtn(\'' + name + '\',' + price + ',\'' + datetime + '\',\'' + sdmc + '\')"><img src="../images/jian.jpg" /></li><li name="myCount" >1</li><li name="jiaBtn" onclick="jiaBtn(\'' + name + '\',' + price + ',\'' + datetime + '\',\'' + sdmc + '\')"><img src="../images/jia.jpg" /></li></ul></div>');
                                        }
                                        else {//有预定至少一种
                                            $("[name='" + datetime + "']").parents(".all").find("[name='" + sdmc + "']").after('<div class="bottom clearfloat" data-id="' + OnSaleId + '"><p name="' + name + '" class="fl"><span  name="ww"  style="color:black">' + name + '</span><span name="myPrice">' + price + '</span></p><div class="you clearfloat fr"><ul><li name="jianBtn" onclick="jianBtn(\'' + name + '\',' + price + ',\'' + datetime + '\',\'' + sdmc + '\')"><img src="../images/jian.jpg" /></li><li name="myCount" >1</li><li name="jiaBtn" onclick="jiaBtn(\'' + name + '\',' + price + ',\'' + datetime + '\',\'' + sdmc + '\')"><img src="../images/jia.jpg" /></li></ul></div>');
                                        }
                                        $("[name='count']").text(function (n, c) { return Number(c) + 1 });
                                        $("[name='sum']").text(function (n, c) { return Number(c) + Number(price) });
                                    }

                                }
                                else {   //不包含该日期则加入日期  
                                    $(".sdetail").prepend(' <div class="all"><div class="top clearfloat" name="top"><div class="you clearfloat fl"><span class="datetime" name="' + datetime + '">' + datetime + '</span></div></div></div>');
                                    if ($("[name='" + datetime + "']").parents(".top").siblings(".bottomall").find("[name='" + sdmc + "']").text() == "") {
                                        $("[name='" + datetime + "']").parents(".top").after('<div class="bottomall"><p class="tit" name="' + sdmc + '">' + sdmc + '预定</p></div>');
                                        $("[name='" + datetime + "']").parents(".all").find("[name='" + sdmc + "']").after('<div class="bottom clearfloat" data-id="' + OnSaleId + '"><p name="' + name + '" class="fl"><span  name="ww"  style="color:black">' + name + '</span><span name="myPrice">' + price + '</span></p><div class="you clearfloat fr"><ul><li name="jianBtn" onclick="jianBtn(\'' + name + '\',' + price + ',\'' + datetime + '\',\'' + sdmc + '\')"><img src="../images/jian.jpg" /></li><li name="myCount" >1</li><li name="jiaBtn" onclick="jiaBtn(\'' + name + '\',' + price + ',\'' + datetime + '\',\'' + sdmc + '\')"><img src="../images/jia.jpg" /></li></ul></div>');
                                    }
                                    $("[name='count']").text(function (n, c) { return Number(c) + 1 });
                                    $("[name='sum']").text(function (n, c) { return Number(c) + Number(price) });
                                }
                                //订餐数量大于0才可以提交
                                if ($('.sdetail').find(".bottom").length > 0) {
                                    $('#determine').attr("onclick", "submit()");
                                }
                            }
                            }              
                    }
                },
                error: function () {
                    alert("异常！");
                }
            });
        }
        //提交菜单加号功能
        function jiaBtn(na, p, datetime, sdmc) {
            //debugger
            $("[name='" + datetime + "']").parents(".top").siblings(".bottomall").find("[name='" + sdmc + "']").siblings(".bottom").find("[name='" + na + "']").parents(".bottom").find("[name='myCount']").text(function (n, c) { return Number(c) + 1 });
            $("[name='count']").text(function (n, c) { return Number(c) + 1 });
            $("[name='sum']").text(function (n, c) { return Number(c) + Number(p) });
        };
        //提交菜单减号功能     
        function jianBtn(na, p, datetime, sdmc) {
            //debugger
            var myPrice = $("[name='" + datetime + "']").parents(".top").siblings(".bottomall").find("[name='" + sdmc + "']").siblings(".bottom").find("[name='" + na + "']").parents(".bottom").find("[name='myPrice']");
            var myCount = $("[name='" + datetime + "']").parents(".top").siblings(".bottomall").find("[name='" + sdmc + "']").siblings(".bottom").find("[name='" + na + "']").parents(".bottom").find("[name='myCount']");
            if (Number(myCount.text()) > 1) {//所减数量大于1
                myCount.text(function (n, c) { return Number(c) - 1 });
            } else {//所减数量小于1
                var aa = $("[name='" + datetime + "']").parents(".all").find(".bottom").length;
                if (aa == 1)//一个日期下只有一个菜
                {
                    $("[name='" + datetime + "']").parents(".all").remove();
                }
                else {//一个日期下有多个菜
                    var bb = $("[name='" + datetime + "']").parents(".all").find("[name='" + sdmc + "']").siblings(".bottom").length;
                    if (bb == 1) {//一个时间段下有一个菜
                        $("[name='" + datetime + "']").parents(".all").find("[name='" + sdmc + "']").siblings(".bottom").find("[name='" + na + "']").parents(".bottomall").remove();
                    }
                    else {//一个时间段下有多个菜
                        $("[name='" + datetime + "']").parents(".all").find("[name='" + sdmc + "']").siblings(".bottom").find("[name='" + na + "']").parents(".bottom").remove();
                    }
                }
                if ($('.all').length < 1) {//没有菜品时，不能提交
                    $('.sdetail').prepend('<div class="top clearfloat"><div class="you clearfloat fl"><p class="tit"></p><span style="text-align:center;margin-top:20px;">没有商品，请选择</span></div></div>');
                    $('#determine').removeAttr("onclick");
                }
            }
            $("[name='count']").text(function (n, c) { return Number(c) - 1 });
            $("[name='sum']").text(function (n, c) { return Number(c) - Number(myPrice.text()) });
        };
        var Autos = new Array();
        $(document).ready(function () {
            SelectTimeState('breakfast'); 
            //getMenuName();
     
        });
        //function getMenuName() {
        //    $.ajax({
        //        type: "post",
        //        url: "../MenuReserveHandler.ashx",
        //        dataType: "json",
        //        async:false,
        //        data: { name: "", funcName: 'getMenuName' },
        //        success: function (data) {
        //            for (var i = 0; i < data.length; i++) {
        //                Autos[i]=data[i].Name;
        //            }
        //        },
        //        error: function () {
        //            alert("异常！");
        //        }
        //    });
        //}
        var returntime = "";
        var reservationtime = "";
        var deductions = "";
        var openid = "";
        $(function () {
            function getUrlParam(openid) {
                var reg = new RegExp("(^|&)" + openid + "=([^&]*)(&|$)");
                var r = window.location.search.substr(1).match(reg);
                if (r != null) return unescape(r[2]); return null;
            }
            openid = getUrlParam('openid');
            $("#OrderList").attr('href', "OrderList.aspx?openid=" + openid + "&type=list0");
            $.ajax({
                type: "post",
                url: "../MenuReserveHandler.ashx",
                dataType: "json",
                async: false,
                data: { funcName: 'getall' },
                success: function (data) {
                    for (var i = 0; i < data.length; i++) {
                        var typename = data[i].typename;
                        var ismenu = data[i].ismenu;
                     deductions = data[i].deductions;
                        reservationdays = data[i].reservationdays;
                        reservationtime = data[i].reservationtime;
                        returntime = data[i].returntime;
                        $.ajax({
                            type: "post",
                            url: "../MenuReserveHandler.ashx",
                            dataType: "json",
                            async: false, 
                            data: { funcName: 'getdatatime', reservationdays: reservationdays },
                            success: function (data) {
                                for (var i = 0; i < data.length; i++) {

                                    $("#seldate").append("<li>" + data[i] + "</li>");
                                }

                            },
                            error: function () {
                                alert("异常！");
                            }
                        });
                    }
                },
                error: function () {
                    alert("异常！");
                }
            });
            $("#seldate").change(function () {
                $.ajax({
                    type: "post",
                    url: "../MenuReserveHandler.ashx",
                    dataType: "json",
                    async: false,
                    data: { funcName: 'Notorder' },
                    success: function (data) {
                     
                        var time = {};
                        var tt = new Array();
                        for (var i = 0; i < data.length; i++) {
                       
                            var remark = data[i].remark;
                            var str = data[i].notorderDate;
                            var tmp = /\d+(?=\+)/.exec(str);
                            var d = new Date(+tmp);
                            var notorderDate = "";
                            //发布是取消注释
                        notorderDate = d.getFullYear() + '/' + (+d.getMonth() + 1) + '/' + d.getDate();
                            //if (d.getMonth() + 1 < 10 && d.getDate() >= 10) {
                            //    notorderDate = d.getFullYear() + '-0' + (+d.getMonth() + 1) + '-' + d.getDate();
                            //}
                            //else if (d.getDate() < 10 && d.getMonth() + 1 >= 10) {
                            //    notorderDate = d.getFullYear() + '-' + (+d.getMonth() + 1) + '-0' + d.getDate();
                            //}
                            //else if (d.getMonth() + 1 < 10 && d.getDate() < 10) {
                            //    notorderDate = d.getFullYear() + '-0' + (+d.getMonth() + 1) + '-0' + d.getDate();
                            //}
                            //else if (d.getMonth() + 1 >= 10 && d.getDate() >=10)
                            //{
                            //    notorderDate = d.getFullYear() + '-' + (+d.getMonth() + 1) + '-' + d.getDate();
                            //}
                            var ww = $("#seldate_dummy").val();
                            if (notorderDate == ww) {
                                $(".weui-dialog__bd").html("" + ww + "不能订餐</br>" + remark + "");
                                $("#dialog").css("display", "block");
                                $("#seldate_dummy").val("");
                        }
                        }
                    },
                    error: function () {
                        alert("异常！");
                    }
                });
                
            });
            $("#seldate").mobiscroll().treelist({
                theme: "android-ics light",
                lang: "zh",
                cancelText: null,
                headerText: "选择日期",
                formatResult: function (array) { return $('#seldate>li').eq(array[0]).text(); }
            });
        })
    </script>
</head>
<!--loading页开始-->
<div class="loading">
    <div class="loader">
        <div class="loader-inner pacman">

            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
        </div>
    </div>
</div>
<!--loading页结束-->
<body>
  
    <!--header star-->
    	<%--<header class="mui-bar mui-bar-nav report-header box-s" id="header">
			<a href="javascript:history.go(-1)"><i class="iconfont icon-fanhui fl"></i></a>
			<p>订餐系统</p>
            
	    </header>--%>
   <%-- <header class="mui-bar mui-bar-nav" id="header" style="position:fixed">
        <a class="btn" href="javascript:history.go(-1)">
            <i class="iconfont icon-fanhui"></i>
        </a>
        <div class="top-sch-box flex-col">
            <div class="centerflex">
                <i class="fdj iconfont icon-sousuo"></i>
                <input type="text"  id="MenuName" value="" class="sch-txt" placeholder="输入您要搜索的菜品" />
            </div>
        </div>
        <a class="btn" href="#">
            <i class="iconfont icon-gouwuche"></i>
            <span>2</span>
        </a>
    </header>--%>
    <!--header end-->

    <div class="warp clearfloat">
        <div class="lists clearfloat">
   <div style="width:100%; position:fixed; z-index:10" id="tops">
           <div class="time clearfloat">
              <%--  <span style="display:none" id="openid"><%=openid%></span>--%>
                <ul>
                   <li style="width: 5%;"><a href="javascript:history.go(-1)"><i class="iconfont icon-fanhui fl"></i></a></li> 
                    <li style="width: 30%;">选择日期</li>
                    <li style="width: 65% ;text-align:left;">
                        <ul id="seldate" style="text-align:center">
                                    
                            </ul>
                   
                    </li>
                </ul>
            </div>
               
            <div class="order-top clearfloat" >
                <ul>
                    <li class="clearfloat"><a href="#">时间段</a></li>
                    <li class="clearfloat" onclick="SelectTimeState('breakfast')" id="breakfast"><a href="#">早餐</a></li>
                    <li class="clearfloat" onclick="SelectTimeState('lunch')" id="lunch"><a href="#">中餐</a></li>
                    <li class="clearfloat" onclick="SelectTimeState('dinner')" id="dinner"><a href="#">晚餐</a></li>
                    <li class="clearfloat" onclick="SelectTimeState('midnightSnack')" id="midnightSnack"><a href="#">夜宵</a></li>
                </ul>
           </div>
            </div>
            <div id="content" style="clear:both;padding-top:3rem;"></div>
              <%--  <div class="bottom clearfloat">
            <div class="lie clearfloat">
						<a href="detail.html">
							<div class="tu clearfloat fl">
								<img src="upload/20.jpg"/>
							</div>
						</a>
						<div class="right clearfloat fl" style="">
							<a href="detail.html">
								<p class="tit">美国阿拉斯加黑鳕鱼（冻黑鳕鱼）</p>
							</a>
							<div class="xia clearfloat">
								<a href="detail.html">
									<p class="jifen fl over">2998</p>
								</a>
								<span class="fr db" name="add" id="add"><img src="../images/jia.png"/></span>
							</div>
						</div>
					</div>
				</div>--%>
           
            
        </div>
         </div>
        <!--footerone star-->
        <div class="settlement clearfloat">
            <div class="zuo clearfloat fl box-s">
                共<span name="count">0</span>件  总金额：￥<span name="sum">0</span>
            </div>
            <a href="#" onclick="toshare()" class="fl db">提交订单
            </a>
        </div>
        <!--footerone end-->

        <!--这里是弹出购物车内容-->
        <div class="am-share">
            <div class="am-share-footer">
                <button class="share_btn">
                    <img src="../images/chahao.png" /></button>
            </div>
            <div class="am-share-sns box-s">
                <div class="sdetail clearfloat">
                  <%--  <div class="all">
                    <div class="top clearfloat">
                        <div class="you clearfloat fl">
                              <span>日期 4月13号</span>
                           
                          
                        </div>
                    </div>
                    <div class="bottomall">
                        <p class="tit">午餐预定</p>
                         	<div class="bottom clearfloat">
                                
		     		<p class="fl">菜单1 <span name="myPrice">10</span></p>
		     		<div class="you clearfloat fr">
		     			<ul>
		     				<li name="jianBtn"><img src="../images/jian.jpg"/></li>
		     				<li name="myCount">1</li>
		     				<li name="jiaBtn"><img src="../images/jia.jpg"/></li>
		     			</ul>
		     		</div>
		     	</div>
                   <div class="bottom clearfloat">
		     		<p class="fl">菜单2 <span name="myPrice">10</span></p>
		     		<div class="you clearfloat fr">
		     			<ul>
		     				<li name="jianBtn"><img src="../images/jian.jpg"/></li>
		     				<li name="myCount">2</li>
		     				<li name="jiaBtn"><img src="../images/jia.jpg"/></li>
		     			</ul>
		     		</div>
		     	</div>
                        </div>
                      <div class="bottomall">
                        <p class="tit">午餐预定</p>
                         	<div class="bottom clearfloat">
                                
		     		<p class="fl">菜单1 <span name="myPrice">10</span></p>
		     		<div class="you clearfloat fr">
		     			<ul>
		     				<li name="jianBtn"><img src="../images/jian.jpg"/></li>
		     				<li name="myCount">1</li>
		     				<li name="jiaBtn"><img src="../images/jia.jpg"/></li>
		     			</ul>
		     		</div>
		     	</div>
                   <div class="bottom clearfloat">
		     		<p class="fl">菜单2 <span name="myPrice">10</span></p>
		     		<div class="you clearfloat fr">
		     			<ul>
		     				<li name="jianBtn"><img src="../images/jian.jpg"/></li>
		     				<li name="myCount">2</li>
		     				<li name="jiaBtn"><img src="../images/jia.jpg"/></li>
		     			</ul>
		     		</div>
		     	</div>
                          </div>
                        </div>--%>
                    <div class="confirm clearfloat">
                        <div class="gmshu clearfloat box-s fl">
                            <p class="fr">共<span name="count">0</span>件商品   合计￥<samp name="sum" id="sum">0</samp></p>
                        </div>
                    </div>
                </div>
            </div>
            <a href="#" onclick="submit()" class="shop-btn db" id="determine">确定</a>
        </div>
   <div style="display: none;"   id="dialog">
    <div class="weui-mask"></div>
    <div class="weui-dialog">
        <div class="weui-dialog__hd"><strong class="weui-dialog__title">提示</strong></div>
        <div class="weui-dialog__bd"></div>
        <div class="weui-dialog__ft">
            <a  href="javascript:$('#dialog').hide();" class="weui-dialog__btn weui-dialog__btn_primary" id="que">确定</a>
        </div>
    </div>
</div>
       <div id="toast" style="display: none;">
    <div class="weui-mask_transparent"></div>
    <div class="weui-toast">
        <i class="weui-icon-success-no-circle weui-icon_toast"></i>
        <p class="weui-toast__content">订餐成功！</p>
    </div>
</div>
        <!--footer star-->
        <footer class="page-footer fixed-footer" id="footer">
            <ul>
               <%-- <li>
                    <a href="index.html">
                        <i class="iconfont icon-shouye" style=""></i>
                        <p>首页</p>
                    </a>
                </li>--%>
                <li class="active" >
                    <a href="#">
                        <i class="iconfont icon-icon04"></i>
                        <p>在线订餐</p>
                    </a>
                </li>
                <li class="right">
                    <a href="OrderList.aspx">
                        <i class="iconfont icon-gouwuche"></i>
                        <p>我的订餐</p>
                    </a>
                </li>
               <%-- <li>
                    <a href="login.html">
                        <i class="iconfont icon-yonghuming"></i>
                        <p>个人中心</p>
                    </a>
                </li>--%>
            </ul>
        </footer>
        <!--footer end-->
</body>
<%--<script type="text/javascript" src="../Script/jquery-1.8.3.min.js" ></script>--%>
<script src="../Script/mui.min.js"></script>
<script src="../Script/others.js"></script>
<script type="text/javascript" src="../Script/hmt.js"></script>
<script src="../Script/slick/slick.js" type="text/javascript"></script>
<script src="../Script/shopcar.js"></script>
<!--插件-->
<link rel="stylesheet" href="../css/swiper.min.css">
<script src="../Script/swiper.jquery.min.js"></script>
</html>
